package com.project_doctor.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
/**
 * @TableName t_message
 */
@TableName(value ="t_message")
public class Message {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long senderId;

    private String content;
    private Date messageTime;
    private Integer isRead; // 新增：消息是否已读
    private Long conversationId;

    @TableField(exist = false,update="false")
    private Doctor sender;

}